unit entIthalatci;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, uClassEntry, cxGraphics, cxControls,
  cxLookAndFeels, cxLookAndFeelPainters, cxContainer, cxEdit,
  cxPCdxBarPopupMenu, cxStyles, cxCustomData, cxFilter, cxData, cxDataStorage,
  Data.DB, cxDBData, Vcl.Menus, Data.Win.ADODB, Vcl.ActnList, cxPropertiesStore,
  cxHeader, Vcl.StdCtrls, cxButtons, cxGridLevel, cxClasses, cxGridCustomView,
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, cxPC,
  cxTextEdit, cxGroupBox, cxMaskEdit, cxSpinEdit, cxDBEdit;

type
  TfmIthalatci = class(TfmClassEntry)
    Label7: TLabel;
    edUnvan: TcxTextEdit;
    grdReportID: TcxGridDBColumn;
    grdReportsFirmaAdi: TcxGridDBColumn;
    grdReportsFirmaAdres: TcxGridDBColumn;
    grdReportsTelefon: TcxGridDBColumn;
    grdReportsFax: TcxGridDBColumn;
    grdReportsEmail: TcxGridDBColumn;
    grdReportsVergiDaire: TcxGridDBColumn;
    grdReportsVergiNo: TcxGridDBColumn;
    grdReportsFirmaIL: TcxGridDBColumn;
    grdReportsFirmaIlce: TcxGridDBColumn;
    grdReportbState: TcxGridDBColumn;
    Label1: TLabel;
    edFirmaAdi: TcxDBTextEdit;
    Label2: TLabel;
    edFirmaAdres: TcxDBTextEdit;
    Label3: TLabel;
    grdReportsDanisman: TcxGridDBColumn;
    edDanisman: TcxDBTextEdit;
    procedure acListExecute(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmIthalatci: TfmIthalatci;

implementation

{$R *.dfm}

procedure TfmIthalatci.acListExecute(Sender: TObject);
var
  ExCursor: TCursor;
begin
  inherited;
  ExCursor := Screen.Cursor;
  Screen.Cursor := crSQLWait;
  try
    With aqList do
    begin
      Close;
      Sql.Text := 'SELECT * FROM tbIthalatci WHERE 1=1';
      if (Trim(edUnvan.Text) <> '') then
        Sql.Add('AND sFirmaAdi Like ''' + Trim(edUnvan.Text) + '%''');
      Open;
    end;
  finally
    Screen.Cursor := ExCursor;
  end;
end;

procedure TfmIthalatci.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  inherited;
  Action := caFree;
  fmIthalatci := nil;
end;

end.
